package com.desksoft.ecommerce.util.html.view.subtable;

import java.io.Serializable;

import com.desksoft.ecommerce.util.html.element.QueryElement;

/***************************************
 * 版权所有：杭州迪科软件 保留所有权利
 * 创建日期: 
 * 创建作者：luoy
 * 文件名称：主从关系表定义
 * 版本：
 * 功能：
 * 最后修改时间：
 * 修改记录：
 *****************************************/
public class SubTable implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8342784110276068712L;
	
	protected String id;					//	表格唯一ID
	protected String mainTableId;			//	主表ID
	protected RelationKey[] relationKeyA;	//	依赖键定义
	protected QueryElement query;			//	从表查询元素
	protected String queryType;
	
	protected String container = "div";

	public SubTable() {
		super();
	}

	public SubTable(String id, String mainTableId, RelationKey[] relationKeyA,
			QueryElement queryElement) {
		super();
		this.id = id;
		this.mainTableId = mainTableId;
		this.relationKeyA = relationKeyA;
		this.query = queryElement;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public RelationKey[] getRelationKeyA() {
		return relationKeyA;
	}

	public void setRelationKeyA(RelationKey[] relationKeyA) {
		this.relationKeyA = relationKeyA;
	}

	public String getMainTableId() {
		return mainTableId;
	}

	public void setMainTableId(String mainTableId) {
		this.mainTableId = mainTableId;
	}

	public QueryElement getQuery() {
		return query;
	}

	public void setQuery(QueryElement query) {
		this.query = query;
	}

	public String getQueryType() {
		return queryType;
	}

	public void setQueryType(String queryType) {
		this.queryType = queryType;
	}

	public String getContainer() {
		return container;
	}

	public void setContainer(String container) {
		if (container == null){
			container = "div";
		}
		this.container = container;
	}
	
}
